Skip to content

fix: restore direct raw EasyEDA JSON input for TSX conversion - #407

Open
techmannih wants to merge 1 commit into
mainfrom
di
Open

fix: restore direct raw EasyEDA JSON input for TSX conversion#407
techmannih wants to merge 1 commit into
mainfrom
di

Conversation

@techmannih

@techmannih techmannih commented Jul 13, 2026

Copy link
Copy Markdown
Member

Description

Screenshot from 2026-07-13 01-24-46

Issue

convertRawEasyToTsx expected the EasyEDA JSON to be wrapped:

convertRawEasyToTsx({ rawEasy })

However, both the CLI and the documented public API pass raw EasyEDA JSON directly:

convertRawEasyToTsx(rawEasy)

Because of this mismatch, rawEasy became undefined, and Zod validation failed with:

Expected object, received undefined

The issue was reproduced while importing the JLCPCB component C44346038.

This was not a problem with BaseShapeSchema or the component's footprint data. The BetterEasy JSON and Circuit JSON conversions were already working correctly; only the TSX conversion path was affected.

Solution

  • Restore support for passing raw EasyEDA JSON directly to convertRawEasyToTsx.
  • Continue supporting the wrapped { rawEasy } input for backward compatibility.
  • Add the real C44346038 EasyEDA fixture.
  • Add a regression test covering raw EasyEDA JSON to TSX conversion.
  • Add a PCB SVG snapshot to validate the generated 41-pad QFN footprint.

The converter now supports both forms:

await convertRawEasyToTsx(rawEasy)
await convertRawEasyToTsx({ rawEasy })

Impact on Other Components

This fix should not negatively affect other components.

  • Direct-input callers now work correctly.
  • Existing callers using { rawEasy } remain supported.
  • BetterEasy conversion is unchanged.
  • Circuit JSON conversion is unchanged.
  • Footprint shape parsing and schemas are unchanged.
  • The fix applies generically and resolves the same TSX import failure for other part numbers.
  • No existing input format was removed.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@techmannih
techmannih requested a review from seveibar July 13, 2026 05:57

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

@seveibar

Copy link
Copy Markdown
Contributor

@techmannih fix the call site, this is absolutely not the right way to fix this!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants